package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type TicketConfirmRequest struct {
	Agree   bool   `form:"agree" json:"agree"`
	Id      uint   `form:"id" json:"id"`
	Comment string `form:"comment" json:"comment"`
}

func (r *TicketConfirmRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *TicketConfirmRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{
		"agree":   "required",
		"id":      "required",
		"comment": "required", // TODO: add validation rules
	}
}

func (r *TicketConfirmRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *TicketConfirmRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *TicketConfirmRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
